package com.snack.shop.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 收货地址实体
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("t_address")
@Schema(description = "收货地址表")
public class Address extends BaseEntity {

    @Schema(description = "用户ID")
    @TableField("user_id")
    @JsonProperty("userId")
    private Long userId;

    @Schema(description = "联系人")
    @TableField("contact_name")
    @JsonProperty("contactName")
    private String contactName;

    @Schema(description = "联系电话")
    @TableField("contact_phone")
    @JsonProperty("contactPhone")
    private String contactPhone;

    @Schema(description = "楼栋")
    private String building;

    @Schema(description = "房间号")
    private String room;

    @Schema(description = "详细地址")
    private String detail;

    @Schema(description = "是否默认：0-否，1-是")
    @TableField("is_default")
    @JsonProperty("isDefault")
    private Integer isDefault;
}

